package com.hntx.joymusic.view.focus;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public class RecyclerViewSpacesItemDecoration extends RecyclerView.ItemDecoration {
    public static final String BOTTOM_DECORATION = "bottom_decoration";
    public static final String LEFT_DECORATION = "left_decoration";
    public static final String RIGHT_DECORATION = "right_decoration";
    public static final String TOP_DECORATION = "top_decoration";
    private int bottomSpace = 0;
    private int leftSpace = 0;
    private int rightSpace = 0;
    private int topSpace = 0;

    public RecyclerViewSpacesItemDecoration(int paramInt) {
        this.bottomSpace = paramInt;
    }

    public RecyclerViewSpacesItemDecoration(int rightSpace, int topSpace, int leftSpace, int bottomSpace) {
        this.rightSpace = rightSpace;
        this.topSpace = topSpace;
        this.leftSpace = leftSpace;
        this.bottomSpace = bottomSpace;
    }

//    public RecyclerViewSpacesItemDecoration(String paramString, int paramInt) {
//        int i = paramString.hashCode();
//        if (i != -2127496380) {
//            if (i != -1705970712) {
//                if (i != -1602936141) {
//                    if ((i == 831755738) && (paramString.equals("top_decoration"))) {
//                        j = 1;
//                        break label119;
//                    }
//                } else if (paramString.equals("right_decoration")) {
//                    j = 0;
//                    break label119;
//                }
//            } else if (paramString.equals("left_decoration")) {
//                j = 2;
//                break label119;
//            }
//        } else if (paramString.equals("bottom_decoration")) {
//            j = 3;
//            break label119;
//        }
//        int j = -1;
//        switch (j) {
//            default:
//                return;
//            case 3:
//                this.bottomSpace = paramInt;
//                return;
//            case 2:
//                this.leftSpace = paramInt;
//                return;
//            case 1:
//                label119:
//                this.topSpace = paramInt;
//                return;
//            case 0:
//        }
//        this.rightSpace = paramInt;
//    }

    public void getItemOffsets(Rect paramRect, View paramView, RecyclerView paramRecyclerView, RecyclerView.State paramState) {
        super.getItemOffsets(paramRect, paramView, paramRecyclerView, paramState);
        paramRect.top = this.topSpace;
        paramRect.left = this.leftSpace;
        paramRect.right = this.rightSpace;
        paramRect.bottom = this.bottomSpace;
    }

    @Retention(RetentionPolicy.SOURCE)
    private static @interface Decoration {
    }
}